package com.qin.springcloud.service;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.qin.springcloud.bean.Users;

@Component
@FeignClient(name = "springcloud-provider-users", fallbackFactory = UserClientServiceFallbackFactory.class)
public interface UserClientService {

	@GetMapping("/users/getone")
	public int getOned();

	@GetMapping("/users/get/{id}")
	public Users getById(@PathVariable(value = "id") int id);

	@GetMapping("/users/getAll")
	public List<Users> getListAll();

	@GetMapping("/users/add")
	public void addUsers(Users users);

}
